package io.jee.caisan.weixin.vo;

import java.math.BigDecimal;

import org.springframework.util.StringUtils;

public class MemberVo {
	private Integer mid;// 用户ID
	private String nickname;// 昵称
	private String mobile;// 手机
	private String email;// 邮箱
	private String openid;// 微信openid
	private BigDecimal caidou = new BigDecimal(0);// 彩豆
	private int credit;// 积分
	private int exp;// 经验
	private int level;// 等级

	public Integer getMid() {
		return mid;
	}

	public void setMid(Integer mid) {
		this.mid = mid;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public BigDecimal getCaidou() {
		return caidou;
	}

	public void setCaidou(BigDecimal caidou) {
		this.caidou = caidou;
	}

	public int getCredit() {
		return credit;
	}

	public void setCredit(int credit) {
		this.credit = credit;
	}

	public int getExp() {
		return exp;
	}

	public void setExp(int exp) {
		this.exp = exp;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}
	
	public String getDisplayName() {
		if(StringUtils.hasText(nickname)){
			return nickname;
		}else{
			return mid.toString();
		}
	}

}
